﻿<Window x:Class="TinyDeduplicator.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="Tiny Deduplicator" MinWidth="520" MinHeight="240">
    <Grid>
        <Label Content="Location:" HorizontalAlignment="Left" Margin="10,10,0,0" VerticalAlignment="Top"/>
        <Button x:Name="btnScan" Content="Scan" HorizontalAlignment="Right" Margin="0,10,10,0" VerticalAlignment="Top" Width="40" Click="btnScan_Click"/>
        <Button x:Name="btnBrowse" Content="Browse" HorizontalAlignment="Right" VerticalAlignment="Top" Width="50" Margin="0,10,55,0" Click="btnBrowse_Click"/>
        <TextBox x:Name="txtLocation" Height="23" TextWrapping="Wrap" VerticalAlignment="Top" Margin="73,10,110,0" HorizontalContentAlignment="Stretch" KeyDown="txtLocation_KeyDown"/>
        <StatusBar x:Name="statusBar" Height="22" VerticalAlignment="Bottom" Margin="0,0,0,0">
            <StatusBar.ItemsPanel>
                <ItemsPanelTemplate>
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*"/>
                            <ColumnDefinition Width="Auto"/>
                        </Grid.ColumnDefinitions>
                    </Grid>
                </ItemsPanelTemplate>
            </StatusBar.ItemsPanel>
            <StatusBarItem Grid.Column="0">
                <Label x:Name="lblStatus" Content="" Padding="5,0"/>
            </StatusBarItem>
            <StatusBarItem HorizontalAlignment="Right" Grid.Column="1">
                <TextBlock x:Name="txbLicense" Padding="5,0" Text="License" TextDecorations="Underline" Foreground="#FF435BAC" PreviewMouseDown="txbLicense_PreviewMouseDown"/>
            </StatusBarItem>
        </StatusBar>
        <DataGrid x:Name="dataGrid" Margin="10,38,10,54" AutoGenerateColumns="False" IsReadOnly="True" HeadersVisibility="Column" Background="{DynamicResource {x:Static SystemColors.WindowBrushKey}}">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding md5Hash}" ClipboardContentBinding="{x:Null}" Header="Hash" Width="220"/>
                <DataGridTextColumn Binding="{Binding path}" ClipboardContentBinding="{x:Null}" Header="Path" Width="*"/>
                <DataGridTextColumn Binding="{Binding size}" ClipboardContentBinding="{x:Null}" Header="Size" Width="80"/>
            </DataGrid.Columns>
            <DataGrid.RowStyle>
                <Style TargetType="DataGridRow">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding deleted}" Value="True">
                            <Setter Property="Background" Value="IndianRed"/>
                        </DataTrigger>
                        <DataTrigger Binding="{Binding selected}" Value="True">
                            <Setter Property="IsSelected" Value="True"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </DataGrid.RowStyle>
        </DataGrid>
        <Button x:Name="btnDelete" Content="Delete" HorizontalAlignment="Right" Margin="0,0,10,27" VerticalAlignment="Bottom" Width="40" RenderTransformOrigin="2.853,0.773" Click="btnDelete_Click"/>
        <Button x:Name="btnOpenFileLocation" Content="Open File Location" HorizontalAlignment="Left" Margin="10,0,0,27" VerticalAlignment="Bottom" Width="110" Click="btnOpenFileLocation_Click"/>
        <Button x:Name="btnOptions" Content="Options" HorizontalAlignment="Right" Margin="0,0,55,27" VerticalAlignment="Bottom" Width="50" Click="btnOptions_Click"/>
    </Grid>
</Window>
